package com.example.demo.TextTest.entity;

import lombok.Data;

import java.math.BigDecimal;

/**
 * 模拟对象
 *
 * @author FF998
 */
@Data
public class SimulaEntity implements Cloneable {

    /**
     * 索引
     */
    private Long id;

    /**
     * 总用量
     */
    private Long quantityClaimed;

    /**
     * 剩余用量
     */
    private Long quantitySurplus;

    /**
     * 次用量
     */
    private Long quantitySingleDose;

    public SimulaEntity(Long id, Long quantityClaimed, Long quantitySurplus, Long quantitySingleDose) {
        this.id = id;
        this.quantityClaimed = quantityClaimed;
        this.quantitySurplus = quantitySurplus;
        this.quantitySingleDose = quantitySingleDose;
    }

    @Override
    public SimulaEntity clone() {
        try {
            return (SimulaEntity) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new AssertionError(e);  // 不会发生，因为 SimulaEntity 实现了 Cloneable
        }
    }
}
